@import url("https://fonts.googleapis.com/css?family=Major+Mono+Display&display=swap");
$orange-radius: 200px;
$originX: 60%;
$trueOrange: #ff9810;

.scene {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
    ellipse at center,
    rgb(169, 3, 41) 0%,
    rgb(143, 2, 34) 44%,
    rgb(109, 0, 25) 100%
  );
  .spatter {
    position: absolute;
    top: calc($originX + 60px);
    left: calc(50% - 260px);
    span {
      background: darken(#9d0327, 10%);
      border-radius: 50%;
      width: 30px;
      height: 10px;
      display: block;
      &:nth-of-type(2) {
        position: relative;
        top: 5px;
        left: 25px;
        opacity: 0.5;
        width: 40px;
        height: 15px;
      }
      &:nth-of-type(3) {
        position: relative;
        top: -13px;
        left: -20px;
        opacity: 0.35;
        width: 22px;
        height: 8px;
      }
    }
  }
  .shadow {
    position: absolute;
    top: calc(#{$originX} + (#{$orange-radius} / 2) - (#{$orange-radius} / 7));
    left: calc(50% + 20px - (#{$orange-radius} / 2));
    width: $orange-radius;
    height: 50px;
    background-image: radial-gradient(
      ellipse at center,
      rgba(0, 0, 0, 0.45) 0%,
      rgba(0, 0, 0, 0) 55%
    );
    &-2 {
      animation-delay: -180ms;
      width: calc($orange-radius * 5 / 6);
      height: calc(50 * 5px / 6);
      left: calc(50% + 20px - (#{$orange-radius} / 2) + 150px);
      top: calc(
        #{$originX} + (#{$orange-radius} / 2) - (#{$orange-radius} / 7) - 50px
      );
    }
    &-3 {
      top: calc(
        #{$originX} + (#{$orange-radius} / 2) - (#{$orange-radius} / 7) - 30px
      );
      left: calc(50% + 20px - (#{$orange-radius} / 2) - 160px);
    }
  }
  .orange {
    width: $orange-radius;
    height: $orange-radius;
    border-radius: 50%;
    background: $trueOrange;
    position: absolute;
    top: calc($originX - (#{$orange-radius} / 2));
    left: calc(50% - (#{$orange-radius} / 2));
    &-2 {
      top: calc($originX - (#{$orange-radius} / 2) - 20px);
      left: calc(50% - (#{$orange-radius} / 2) + 150px);
      width: calc($orange-radius * 5 / 6);
      height: calc($orange-radius * 5 / 6);
      animation-delay: -180ms;
      .stem {
        transform: rotate(22deg);
        right: 24px;
        top: 48px;
      }
      .glow {
        top: 25px;
        left: 20px;
      }
    }
  }
  .dimple-holder {
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 100%;
    .dimples {
      background: repeating-linear-gradient(
          0.25turn,
          transparent 0,
          $trueOrange 4px,
          $trueOrange 10px
        ),
        repeating-linear-gradient(
          transparent 0,
          transparent 9px,
          darken($trueOrange, 25%) 10px
        );
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      border-radius: 100%;
      & + .dimples {
        top: 5px;
        left: 5px;
        opacity: 0.5;
      }
    }
    .inner-shadow {
      width: 120%;
      height: 120%;
      position: absolute;
      right: 0;
      bottom: 0;
      background-image: radial-gradient(
        ellipse at center,
        rgba(0, 0, 0, 0) 60%,
        rgba(0, 0, 0, 0.65) 100%
      );
    }
  }
  .half-orange {
    position: absolute;
    top: calc($originX - 135px);
    left: calc(50% - 275px);
    width: $orange-radius;
    height: $orange-radius;
    transform: rotate(-45deg);
    .peel-outer {
      margin-top: calc(#{$orange-radius} / 2);
      overflow: hidden;
      height: calc(#{$orange-radius} / 2);
      position: relative;
      .dimple-holder {
        top: -100%;
        height: 200%;
        transform: rotate(35deg);
      }
      .peel {
        margin-top: calc($orange-radius * -1 / 2);
        background: $trueOrange;
        width: $orange-radius;
        height: $orange-radius;
        border-radius: 0 0 100% 100%;
      }
    }
    .rind {
      position: absolute;
      top: 33.33%;
      left: 0;
      right: 0;
      border-radius: 50%;
      background-color: $trueOrange;
      height: calc($orange-radius/3);
      &-inner {
        position: absolute;
        inset: 4px;
        border-radius: 50%;
        background-color: #ffe4b7;
        .juicy {
          position: absolute;
          top: 4px;
          left: 7px;
          right: 9px;
          bottom: 7px;
          border-radius: 50%;
          background-color: $trueOrange;
          overflow: hidden;
          .center {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 20px;
            height: 7px;
            border-radius: 50%;
            background-color: #ffe4b7;
          }
          .line {
            position: absolute;
            left: 0;
            top: 50%;
            opacity: 0.5;
            right: 0;
            height: 1px;
            background-color: #ffe4b7;
            &:nth-last-of-type(2) {
              left: 50%;
              top: 0;
              bottom: 0;
              right: auto;
              width: 1px;
              height: auto;
            }
            &:nth-last-of-type(3) {
              transform: rotate(20deg);
            }
            &:nth-last-of-type(4) {
              transform: rotate(-20deg);
            }
          }
        }
      }
    }
    .drip {
      position: absolute;
      left: -2px;
      top: 48%;
      width: 5px;
      height: 10px;
      background-color: $trueOrange;
      border-radius: 50%;
      transform: rotate(45deg);
      animation: drip 1.7s infinite ease-in;
    }
  }
  .sigh {
    animation: sigh 1.7s -400ms infinite cubic-bezier(0.28, 0.84, 0.42, 1);
  }
}

.bounce {
  animation: bounce 1.45s infinite cubic-bezier(0.28, 0.84, 0.42, 1);
}

.center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  background-color: blue;
  z-index: 100;
  transform: translate(-50%, -50%);
}

.title {
  position: absolute;
  font-family: "Major Mono Display", monospace;
  color: $trueOrange;
  top: 16px;
  left: 16px;
  font-size: 22px;
  word-spacing: -5px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  &::before {
    content: "";
    position: absolute;
    top: 32px;
    left: 0;
    width: 87px;
    height: 3px;
    background-color: $trueOrange;
    opacity: 0.25;
  }
}

.glow {
  position: absolute;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  width: 70px;
  height: 80px;
  top: 35px;
  left: 25px;
  border-radius: 50%;
}

.stem {
  position: absolute;
  top: 28px;
  right: 42px;
  &_base {
    position: absolute;
    right: 1px;
    top: 0;
    background: darken(#87922b, 5%);
    width: 18px;
    height: 18px;
    transform: rotate(25deg);
    border-radius: 5px 10px 1px 10px;
    box-shadow: 0 0 8px rgba(black, 0.4);
  }
  &_stalk {
    position: absolute;
    top: -8px;
    left: -12px;
    background: #87922b;
    width: 12px;
    height: 20px;
    transform: rotate(40deg);
    border-radius: 5px 10px 1px 10px;
  }
}

.shink {
  animation: shrink 1.5s infinite cubic-bezier(0.28, 0.84, 0.42, 1);
}

@keyframes drip {
  0% {
    transform: rotate(45deg);
  }
  25% {
    transform: rotate(45deg);
    left: -20px;
    top: 58%;
    opacity: 1;
    width: 5px;
  }
  35% {
    transform: rotate(45deg) scale(1.5);
    left: -22px;
    top: 59%;
    opacity: 0.5;
    height: 4px;
  }
  50% {
    transform: rotate(45deg) scale(1.5);
    left: -26px;
    top: 58%;
    opacity: 0;
    width: 16px;
  }
  100% {
    transform: rotate(45deg) scale(1.5);
    opacity: 0;
    left: -26px;
    top: 65%;
    width: 16px;
  }
}
@keyframes bounce {
  0% {
    transform: scale(1, 1) translateY(0);
  }
  10% {
    transform: scale(1.1, 0.9) translateY(0);
  }
  30% {
    transform: scale(0.9, 1.1) translateY(-85px);
  }
  50% {
    transform: scale(1.05, 0.9) translateY(10px);
  }
  57% {
    transform: scale(1, 1) translateY(-15px);
  }
  60%,
  100% {
    transform: scale(1, 1) translateY(0);
  }
}
@keyframes sigh {
  0% {
    transform: scale(1) translateY(0) rotate(-45deg);
  }
  30% {
    transform: scale(1.03, 0.97) translateY(5px) rotate(-45deg);
  }
  57%,
  100% {
    transform: scale(1) translateY(0) rotate(-45deg);
  }
}
@keyframes shrink {
  0%,
  57%,
  64%,
  100% {
    transform: scale(1, 1) translateY(0);
  }
  10% {
    transform: scale(1.1, 0.9) translateY(0);
  }
  30% {
    transform: scale(0.8, 1.1) translateY(0);
  }
  50% {
    transform: scale(1.15, 0.95) translateY(0);
  }
}

.test {
  position: absolute;
  top: 100px;
  right: 100px;
  width: 200px;
  height: 180px;
  background: #ff9810;
  border-radius: 50%;
  &::before,
  &::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-image: repeating-linear-gradient(
        90deg,
        transparent 0,
        #ff9810 4px,
        #ff9810 10px
      ),
      repeating-linear-gradient(transparent 0, transparent 9px, #905200 10px);
  }
  &::after {
    top: 5px;
    left: 5px;
    opacity: 0.5;
  }
}
